<template>
  <div class="app-all-function">
    <div class="app-main">
      <dl class="module-list" v-for="(item,index) in slideList">
        <dt class="module-list-header">{{item.title}}</dt>
        <dd class="item" v-for="(itemFun,indexFun) in item.attr">
          <router-link class="item-content" :to="{path:itemFun.url}">
            <div class="item-iconfont">
              <span :class="['iconfont',itemFun.iconfont]" :style="{background:item.color}"></span>
            </div>
            <div class="item-title">{{itemFun.remark}}</div>
          </router-link>
        </dd>
      </dl>
    </div>
  </div>
</template>
<script>
  import { Header,Swipe, SwipeItem,MessageBox } from 'mint-ui';
  export default{
    data () {
      return {
        slideList:[{
            title:'采购',
            color:'#c6872d',
            attr:[
              {
                remark:'采购单',
                url:'purchasing-management',
                iconfont:'icon-webicon05',
              },{
                remark:'采购历史',
                url:'purchasing-list',
                iconfont:'icon-quanbudingdan',
              },
//              {
//                remark:'采购退货单',
//                url:'',
//                iconfont:'icon-quanbudingdan',
//              },{
//                remark:'采购退货历史',
//                url:'',
//                iconfont:'icon-quanbudingdan',
//              },
            ]
          },
          {
            title:'销售',
            color:'#63bd65',
            attr:[
              {
                remark:'销售单',
                url:'',
                iconfont:'icon-xiaoshoudan',
              },{
                remark:'销售历史',
                url:'',
                iconfont:'icon-quanbudingdan',
              },
            ]
          },
          {
            title:'库存',
            color:'#3175fb',
            attr:[
              {
                remark:'库存浏览',
                url:'',
                iconfont:'icon-xiaoshoudan',
              },{
                remark:'移库管理',
                url:'',
                iconfont:'icon-quanbudingdan',
              },{
                remark:'仓库仓位',
                url:'app-warehouse-list',
                iconfont:'icon-quanbudingdan',
              },
            ]
          },
        ],
      }
    },
    beforeDestroy: function() {
      document.body.removeAttribute("class","add_bg");
    },
    mounted(){
      document.getElementsByTagName("body")[0].className="add_bg";
    },
    methods:{}
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->

<style>
  body{
    font-size: 28px;
  }
  .app-all-function{
    overflow-x: hidden;
  }
 .app-all-function .app-main{
    padding:0 0 62px;
  }
  .app-all-function .mint-swipe{
    height:160px;
    text-align: center;
  }
  .app-all-function .mint-swipe img{
    height: 100%;
  }
  .app-all-function .app-header{
    padding:0 0 12px;
    text-align: center;
  }
  .app-all-function .module-list{
    position: relative;
    display: flex;
    flex-wrap:wrap;
    border-bottom:2px solid #f5f5f5;
  }
  .app-all-function .module-list .module-list-header{
    width: 100%;
    padding:4px 12px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    letter-spacing:1px;
  }
  .app-all-function .module-list .item{
    display: flex;
    width: 33.2%;
    padding:1px;
    margin: 0;
    border-bottom:1px solid #f5f5f5;
    border-right:1px solid #f5f5f5;
  }
  .app-all-function .module-list .item-content{
    background: #fff;
    flex-wrap:wrap;
    width: 100%;
    padding:24px 0;
    border-radius:3px;
    justify-content:center;
    font-size: 13px;
    color: #666;
    text-align: center;
  }
  .app-all-function .module-list .iconfont{
    display:flex;
    justify-content:center;
    width:32px;
    height:32px;
    border-radius:50%;
    font-size:16px;
    color: #fff;
    margin:0 0 2px;
    align-items:center;
  }
  .app-all-function .module-list .item-iconfont{
    display:flex;
    width: 100%;
    padding:0 0 4px;
    justify-content:center;
    text-align: center;
  }
  .module-my-store .store-header{
    background:#007EE5;
    padding:11px 0;
    text-align: center;
    font-size: 16px;
    color: #fff;
  }
  .module-my-store .store-header .title{
    position: relative;
    display: inline-block;
    padding-right: 20px;
  }
  .module-my-store .store-header .title:after{
    position: absolute;
    top: 10px;
    right: 0;
    content: '';
    border:5px solid transparent;
    border-top:5px solid #fff;

  }
  .module-my-store.active .store-header .title:after{
    top: 5px;
    border:5px solid transparent;
    border-bottom:5px solid #fff;
  }
  .module-my-store .store-body{
    background:#585d7b;
    height: 0;
    overflow: hidden;
    transition: all .3s;

  }
  .module-my-store.active .store-body{
    height:86px;
  }
  .module-my-store .store-body .store-list{
    display: flex;
    padding:16px 20px;
  }
  .module-my-store .store-body .store-list .item-title{
    display: block;
    margin:6px 0 0;
    padding:0 3px;
    height: 16px;
    overflow: hidden;

  }
  .module-my-store .store-body .item{
    width:25%;
    color: #787d9b;
    text-align: center;
  }
  .module-my-store .store-body .item .iconfont{
    display: block;
    width: 36px;
    height: 36px;
    margin:0 auto 4px;
    line-height: 36px;
    font-size: 24px;
    border-radius: 3px;
    background:#737896;
    color: #fff;
  }
  .module-my-store .store-body .item.active{
    color: #fff;
  }
  .module-my-store .store-body .item.active .iconfont{
    background: #fff;
    color:#007EE5;
    font-weight: bold;
  }
  .dd{
    background: #fff;
    display:flex;
    justify-content:center;
    align-items: center;
  }

  @keyframes anim1 {
    0%{
      width: 100px;
    }
    50%{

    }
    100%{
      width: 1200px;
      border: 1px solid #ddd;
      shape-margin: 100px;
      position: relative;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
  }

</style>
